<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Win32k: msgbeep.c 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Win32k
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a03605.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">函数</a> &#124;
<a href="#var-members">变量</a>  </div>
  <div class="headertitle">
<div class="title">kernel/msgbeep.c 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="a03629_source.html">precomp.h</a>&quot;</code><br />
<code>#include &lt;ntddbeep.h&gt;</code><br />
<code>#include &lt;mmsystem.h&gt;</code><br />
</div>
<p><a href="a03605_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:ae02846f1e92a9e2d343f891016271a6d"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03605.html#ae02846f1e92a9e2d343f891016271a6d">xxxOldMessageBeep</a> (<a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> dwType)</td></tr>
<tr class="separator:ae02846f1e92a9e2d343f891016271a6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac64f26974e8be38be75a0ec490d77406"><td class="memItemLeft" align="right" valign="top">NTSTATUS&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03605.html#ac64f26974e8be38be75a0ec490d77406">xxxClientCallSoundDriver</a> (BOOL fInit, PUNICODE_STRING pstrName OPTIONAL, <a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> idSnd OPTIONAL, <a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> dwFlags OPTIONAL, PBOOL pbResult OPTIONAL)</td></tr>
<tr class="separator:ac64f26974e8be38be75a0ec490d77406"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f1ae6130c5b61d08ef3cb8156d87333"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03605.html#a4f1ae6130c5b61d08ef3cb8156d87333">xxxMessageBeep</a> (<a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> dwType)</td></tr>
<tr class="separator:a4f1ae6130c5b61d08ef3cb8156d87333"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3b0c33e20363be2ffa1cd10a3d54342"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03605.html#aa3b0c33e20363be2ffa1cd10a3d54342">xxxPlayEventSound</a> (LPWSTR lpszwSound)</td></tr>
<tr class="separator:aa3b0c33e20363be2ffa1cd10a3d54342"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
变量</h2></td></tr>
<tr class="memitem:a8a7fb64d8f061ede5f39648175d61e2a"><td class="memItemLeft" align="right" valign="top">NTSTATUS&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03605.html#a8a7fb64d8f061ede5f39648175d61e2a">StatusSoundDriver</a> = STATUS_DEVICE_NOT_READY</td></tr>
<tr class="separator:a8a7fb64d8f061ede5f39648175d61e2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">函数说明</h2>
<a id="ac64f26974e8be38be75a0ec490d77406"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac64f26974e8be38be75a0ec490d77406">&#9670;&nbsp;</a></span>xxxClientCallSoundDriver()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NTSTATUS xxxClientCallSoundDriver </td>
          <td>(</td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fInit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PUNICODE_STRING pstrName&#160;</td>
          <td class="paramname"><em>OPTIONAL</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> idSnd&#160;</td>
          <td class="paramname"><em>OPTIONAL</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> dwFlags&#160;</td>
          <td class="paramname"><em>OPTIONAL</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PBOOL pbResult&#160;</td>
          <td class="paramname"><em>OPTIONAL</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="reference">被这些函数引用 <a class="el" href="a03605_source.html#l00067">xxxMessageBeep()</a> , 以及 <a class="el" href="a03605_source.html#l00164">xxxPlayEventSound()</a>.</p>

</div>
</div>
<a id="a4f1ae6130c5b61d08ef3cb8156d87333"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f1ae6130c5b61d08ef3cb8156d87333">&#9670;&nbsp;</a></span>xxxMessageBeep()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL xxxMessageBeep </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>dwType</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03605_source.html">kernel/msgbeep.c</a> 第 <a class="el" href="a03605_source.html#l00067">67</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;{</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> sndid;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> dwFlags;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    BOOL bResult;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <a class="code" href="a02889.html">PTHREADINFO</a> pti = <a class="code" href="a00257.html#a8315d2c807ba18ba9e528c40614b6173">PtiCurrent</a>();</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keywordflow">if</span> (pti-&gt;<a class="code" href="a02889.html#ae8b869ec5b101646649020f5b0fd5d0d">TIF_flags</a> &amp; TIF_SYSTEMTHREAD) {</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <a class="code" href="a03605.html#ae02846f1e92a9e2d343f891016271a6d">xxxOldMessageBeep</a>(0);</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    }</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="a03257.html#ad16ba1d376392ea2e23fbea4fa166ad7">fBeep</a>) {</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <a class="code" href="a00599.html#a47af503ea2c52aebdffe8c960b8249fd">_UserSoundSentryWorker</a>(0);</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    }</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordflow">switch</span>(dwType &amp; MB_ICONMASK) {</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keywordflow">case</span> MB_ICONHAND:</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        sndid = SND_ALIAS_SYSTEMHAND;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordflow">case</span> MB_ICONQUESTION:</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        sndid = SND_ALIAS_SYSTEMQUESTION;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keywordflow">case</span> MB_ICONEXCLAMATION:</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        sndid = SND_ALIAS_SYSTEMEXCLAMATION;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="keywordflow">case</span> MB_ICONASTERISK:</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        sndid = SND_ALIAS_SYSTEMASTERISK;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        sndid = SND_ALIAS_SYSTEMDEFAULT;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    }</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="comment">     * Note: by passing an integer identifier we do not need to load</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;<span class="comment">     * any string from a resource.  This makes our side quicker and the</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="comment">     * interface slightly more efficient (less string copying).</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="comment">     * It does not prevent strings from being passed to PlaySound.</span></div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160; </div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="a03605.html#a8a7fb64d8f061ede5f39648175d61e2a">StatusSoundDriver</a> == STATUS_DEVICE_NOT_READY)</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <a class="code" href="a03605.html#a8a7fb64d8f061ede5f39648175d61e2a">StatusSoundDriver</a> = <a class="code" href="a03605.html#ac64f26974e8be38be75a0ec490d77406">xxxClientCallSoundDriver</a>(TRUE, NULL, 0, 0, NULL);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="a03605.html#a8a7fb64d8f061ede5f39648175d61e2a">StatusSoundDriver</a> == STATUS_DLL_NOT_FOUND) {</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        bResult = (<a class="code" href="a03605.html#ae02846f1e92a9e2d343f891016271a6d">xxxOldMessageBeep</a>(dwType));  <span class="comment">// No sound on this machine</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <span class="keywordflow">return</span> bResult;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    }</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="comment">// BUGBUG LATER</span></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="comment">// So we can test the call to play the sound synchronously, we test</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <span class="comment">// the taskmodal flag and if set make a synchronous call.  If the</span></div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="comment">// flag is not set - the usual case, then the call is asynchronous</span></div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="comment">// which causes a thread to be created in the winmm dll to complete</span></div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="comment">// the request.</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160; </div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    dwFlags = SND_ALIAS_ID;</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keywordflow">if</span> (dwType &amp; MB_TASKMODAL) {</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        dwFlags |= SND_SYNC;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        dwFlags |= SND_ASYNC;</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    }</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="comment">     * Play the sound</span></div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="a03605.html#ac64f26974e8be38be75a0ec490d77406">xxxClientCallSoundDriver</a>(FALSE, NULL, sndid, dwFlags, &amp;bResult) ==</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;            STATUS_ACCESS_VIOLATION) {</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;<span class="comment">         * It had an exception. Just beep.</span></div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        bResult = (<a class="code" href="a03605.html#ae02846f1e92a9e2d343f891016271a6d">xxxOldMessageBeep</a>(dwType));</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        <a class="code" href="a00599.html#a47af503ea2c52aebdffe8c960b8249fd">_UserSoundSentryWorker</a>(0);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    }</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160; </div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keywordflow">return</span> bResult;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00599_source.html#l02424">_UserSoundSentryWorker()</a>, <a class="el" href="a00563_source.html#l00175">DWORD</a>, <a class="el" href="a03257_source.html#l00287">fBeep</a>, <a class="el" href="a00263_source.html#l00526">PtiCurrent()</a>, <a class="el" href="a03605_source.html#l00048">StatusSoundDriver</a>, <a class="el" href="a00899_source.html#l02294">tagTHREADINFO::TIF_flags</a>, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a>, <a class="el" href="a03605.html#ac64f26974e8be38be75a0ec490d77406">xxxClientCallSoundDriver()</a> , 以及 <a class="el" href="a03605_source.html#l00027">xxxOldMessageBeep()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00893_source.html#l00089">InternalToUnicodeEx()</a>, <a class="el" href="a00929_source.html#l00070">VKFromVSC()</a>, <a class="el" href="a00671_source.html#l01146">xxxDefWindowProc()</a>, <a class="el" href="a00671_source.html#l00392">xxxDWP_SetCursor()</a>, <a class="el" href="a03590_source.html#l00241">xxxMNChar()</a> , 以及 <a class="el" href="a00782_source.html#l00320">xxxMNKeyFilter()</a>.</p>

</div>
</div>
<a id="ae02846f1e92a9e2d343f891016271a6d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae02846f1e92a9e2d343f891016271a6d">&#9670;&nbsp;</a></span>xxxOldMessageBeep()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL xxxOldMessageBeep </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>dwType</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03605_source.html">kernel/msgbeep.c</a> 第 <a class="el" href="a03605_source.html#l00027">27</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;{</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    BOOL b;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="a03257.html#ad16ba1d376392ea2e23fbea4fa166ad7">fBeep</a>) {</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        <a class="code" href="a00899.html#ac2181d07596893ed44d18aa267ce4d23">LeaveCrit</a>();</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;        b = <a class="code" href="a00608.html#af5893e53f677c0f2acc765c8b47fa12a">UserBeep</a>(440, 125);</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        <a class="code" href="a00899.html#ae451a2dc8791c420d7c956a63adc33ba">EnterCrit</a>();</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keywordflow">return</span> b;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        <a class="code" href="a00599.html#a47af503ea2c52aebdffe8c960b8249fd">_UserSoundSentryWorker</a>(0);</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    }</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; </div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00599_source.html#l02424">_UserSoundSentryWorker()</a>, <a class="el" href="a00899.html#ae451a2dc8791c420d7c956a63adc33ba">EnterCrit()</a>, <a class="el" href="a03257_source.html#l00287">fBeep</a>, <a class="el" href="a00899.html#ac2181d07596893ed44d18aa267ce4d23">LeaveCrit()</a> , 以及 <a class="el" href="a00608_source.html#l00102">UserBeep()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03605_source.html#l00067">xxxMessageBeep()</a>.</p>

</div>
</div>
<a id="aa3b0c33e20363be2ffa1cd10a3d54342"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa3b0c33e20363be2ffa1cd10a3d54342">&#9670;&nbsp;</a></span>xxxPlayEventSound()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID xxxPlayEventSound </td>
          <td>(</td>
          <td class="paramtype">LPWSTR&#160;</td>
          <td class="paramname"><em>lpszwSound</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03605_source.html">kernel/msgbeep.c</a> 第 <a class="el" href="a03605_source.html#l00164">164</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;{</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    UNICODE_STRING String;</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    <a class="code" href="a02889.html">PTHREADINFO</a>    pti;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160; </div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160; </div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="a03257.html#a8b8884d8d8e4d1f4f0393bf0e96dd90d">gbExtendedSounds</a>)</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160; </div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    pti = <a class="code" href="a00257.html#a8315d2c807ba18ba9e528c40614b6173">PtiCurrent</a>();</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160; </div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    <span class="keywordflow">if</span> (pti-&gt;<a class="code" href="a02889.html#ae8b869ec5b101646649020f5b0fd5d0d">TIF_flags</a> &amp; TIF_SYSTEMTHREAD)</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160; </div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="a03605.html#a8a7fb64d8f061ede5f39648175d61e2a">StatusSoundDriver</a> == STATUS_DEVICE_NOT_READY)</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        <a class="code" href="a03605.html#a8a7fb64d8f061ede5f39648175d61e2a">StatusSoundDriver</a> = <a class="code" href="a03605.html#ac64f26974e8be38be75a0ec490d77406">xxxClientCallSoundDriver</a>(TRUE, NULL, 0, 0, NULL);</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160; </div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="a03605.html#a8a7fb64d8f061ede5f39648175d61e2a">StatusSoundDriver</a> == STATUS_DLL_NOT_FOUND)</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160; </div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="comment">     * Play the sound</span></div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    RtlInitUnicodeString(&amp;String, lpszwSound);</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="a03605.html#ac64f26974e8be38be75a0ec490d77406">xxxClientCallSoundDriver</a>(FALSE, &amp;String, 0,</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;            SND_ALIAS | SND_ASYNC | SND_NODEFAULT, NULL) ==</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;                    STATUS_ACCESS_VIOLATION) {</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;<span class="comment">         * It had an exception. Just beep.</span></div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        <a class="code" href="a00371.html#a01c4659626880ba56745765a3580a36b">RIPMSG0</a>(<a class="code" href="a00371.html#afa5f32de88404289ec03cd2c0e61e94f">RIP_ERROR</a>, <span class="stringliteral">&quot;PlayEventSound: PlaySound Faulted&quot;</span>);</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <a class="code" href="a00599.html#a47af503ea2c52aebdffe8c960b8249fd">_UserSoundSentryWorker</a>(0);</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    }</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00599_source.html#l02424">_UserSoundSentryWorker()</a>, <a class="el" href="a03257_source.html#l00288">gbExtendedSounds</a>, <a class="el" href="a00263_source.html#l00526">PtiCurrent()</a>, <a class="el" href="a00371_source.html#l00028">RIP_ERROR</a>, <a class="el" href="a00371_source.html#l00131">RIPMSG0</a>, <a class="el" href="a03605_source.html#l00048">StatusSoundDriver</a>, <a class="el" href="a00899_source.html#l02294">tagTHREADINFO::TIF_flags</a> , 以及 <a class="el" href="a03605.html#ac64f26974e8be38be75a0ec490d77406">xxxClientCallSoundDriver()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03614_source.html#l07902">NtUserPlayEventSound()</a>, <a class="el" href="a00824_source.html#l00933">xxxCreateThreadInfo()</a>, <a class="el" href="a03590_source.html#l01977">xxxMNCancel()</a>, <a class="el" href="a03590_source.html#l02115">xxxMNShowPopupWindow()</a>, <a class="el" href="a00875_source.html#l00198">xxxSysCommand()</a> , 以及 <a class="el" href="a00788_source.html#l00052">xxxTrackPopupMenuEx()</a>.</p>

</div>
</div>
<h2 class="groupheader">变量说明</h2>
<a id="a8a7fb64d8f061ede5f39648175d61e2a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8a7fb64d8f061ede5f39648175d61e2a">&#9670;&nbsp;</a></span>StatusSoundDriver</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NTSTATUS StatusSoundDriver = STATUS_DEVICE_NOT_READY</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a03605_source.html">kernel/msgbeep.c</a> 第 <a class="el" href="a03605_source.html#l00048">48</a> 行定义.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03605_source.html#l00067">xxxMessageBeep()</a> , 以及 <a class="el" href="a03605_source.html#l00164">xxxPlayEventSound()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aa02889_html_ae8b869ec5b101646649020f5b0fd5d0d"><div class="ttname"><a href="a02889.html#ae8b869ec5b101646649020f5b0fd5d0d">tagTHREADINFO::TIF_flags</a></div><div class="ttdeci">DWORD TIF_flags</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02294">userk.h:2294</a></div></div>
<div class="ttc" id="aa00371_html_a01c4659626880ba56745765a3580a36b"><div class="ttname"><a href="a00371.html#a01c4659626880ba56745765a3580a36b">RIPMSG0</a></div><div class="ttdeci">#define RIPMSG0(flags, szFmt)</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00131">winerrp.h:131</a></div></div>
<div class="ttc" id="aa00899_html_ae451a2dc8791c420d7c956a63adc33ba"><div class="ttname"><a href="a00899.html#ae451a2dc8791c420d7c956a63adc33ba">EnterCrit</a></div><div class="ttdeci">VOID EnterCrit(VOID)</div></div>
<div class="ttc" id="aa00371_html_afa5f32de88404289ec03cd2c0e61e94f"><div class="ttname"><a href="a00371.html#afa5f32de88404289ec03cd2c0e61e94f">RIP_ERROR</a></div><div class="ttdeci">#define RIP_ERROR</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00028">winerrp.h:28</a></div></div>
<div class="ttc" id="aa00257_html_a8315d2c807ba18ba9e528c40614b6173"><div class="ttname"><a href="a00257.html#a8315d2c807ba18ba9e528c40614b6173">PtiCurrent</a></div><div class="ttdeci">PTHREADINFO PtiCurrent(VOID)</div><div class="ttdef"><b>Definition:</b> <a href="a00263_source.html#l00526">winmgrc.c:526</a></div></div>
<div class="ttc" id="aa00599_html_a47af503ea2c52aebdffe8c960b8249fd"><div class="ttname"><a href="a00599.html#a47af503ea2c52aebdffe8c960b8249fd">_UserSoundSentryWorker</a></div><div class="ttdeci">BOOL _UserSoundSentryWorker(UINT uVideoMode)</div><div class="ttdef"><b>Definition:</b> <a href="a00599_source.html#l02424">access.c:2424</a></div></div>
<div class="ttc" id="aa00563_html_a074685e97e89d6aa2accdfcb82328699"><div class="ttname"><a href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a></div><div class="ttdeci">ddeml v[i&lt; inst &gt;][t&lt; type &gt;][hObj|pObj] Dump DDEML state information ddeml lists all ddeml instances for this process n ddeml t&lt; type &gt; lists all ddeml objects of the given type n n assumes link is first DWORD</div><div class="ttdef"><b>Definition:</b> <a href="a00563_source.html#l00175">exts.h:175</a></div></div>
<div class="ttc" id="aa03257_html_a8b8884d8d8e4d1f4f0393bf0e96dd90d"><div class="ttname"><a href="a03257.html#a8b8884d8d8e4d1f4f0393bf0e96dd90d">gbExtendedSounds</a></div><div class="ttdeci">BOOL gbExtendedSounds</div><div class="ttdef"><b>Definition:</b> <a href="a03257_source.html#l00288">kernel/globals.c:288</a></div></div>
<div class="ttc" id="aa00608_html_af5893e53f677c0f2acc765c8b47fa12a"><div class="ttname"><a href="a00608.html#af5893e53f677c0f2acc765c8b47fa12a">UserBeep</a></div><div class="ttdeci">BOOL UserBeep(DWORD dwFreq, DWORD dwDuration)</div><div class="ttdef"><b>Definition:</b> <a href="a00608_source.html#l00102">base.c:102</a></div></div>
<div class="ttc" id="aa03605_html_ac64f26974e8be38be75a0ec490d77406"><div class="ttname"><a href="a03605.html#ac64f26974e8be38be75a0ec490d77406">xxxClientCallSoundDriver</a></div><div class="ttdeci">NTSTATUS xxxClientCallSoundDriver(BOOL fInit, PUNICODE_STRING pstrName OPTIONAL, DWORD idSnd OPTIONAL, DWORD dwFlags OPTIONAL, PBOOL pbResult OPTIONAL)</div></div>
<div class="ttc" id="aa00899_html_ac2181d07596893ed44d18aa267ce4d23"><div class="ttname"><a href="a00899.html#ac2181d07596893ed44d18aa267ce4d23">LeaveCrit</a></div><div class="ttdeci">VOID LeaveCrit(VOID)</div></div>
<div class="ttc" id="aa03608_html_afd1a0e78d1f88954d93e48ab3821781f"><div class="ttname"><a href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a></div><div class="ttdeci">typedef UINT(FAR WINAPI *MSGSOUNDPROC)()</div></div>
<div class="ttc" id="aa02889_html"><div class="ttname"><a href="a02889.html">tagTHREADINFO</a></div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02260">userk.h:2260</a></div></div>
<div class="ttc" id="aa03605_html_a8a7fb64d8f061ede5f39648175d61e2a"><div class="ttname"><a href="a03605.html#a8a7fb64d8f061ede5f39648175d61e2a">StatusSoundDriver</a></div><div class="ttdeci">NTSTATUS StatusSoundDriver</div><div class="ttdef"><b>Definition:</b> <a href="a03605_source.html#l00048">kernel/msgbeep.c:48</a></div></div>
<div class="ttc" id="aa03257_html_ad16ba1d376392ea2e23fbea4fa166ad7"><div class="ttname"><a href="a03257.html#ad16ba1d376392ea2e23fbea4fa166ad7">fBeep</a></div><div class="ttdeci">BOOL fBeep</div><div class="ttdef"><b>Definition:</b> <a href="a03257_source.html#l00287">kernel/globals.c:287</a></div></div>
<div class="ttc" id="aa03605_html_ae02846f1e92a9e2d343f891016271a6d"><div class="ttname"><a href="a03605.html#ae02846f1e92a9e2d343f891016271a6d">xxxOldMessageBeep</a></div><div class="ttdeci">BOOL xxxOldMessageBeep(UINT dwType)</div><div class="ttdef"><b>Definition:</b> <a href="a03605_source.html#l00027">kernel/msgbeep.c:27</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_cd70cb5eb491250157f2d55d3ff4b13e.html">backup</a></li><li class="navelem"><a class="el" href="dir_ba2b673b566ba104b956abdc6dec0552.html">org</a></li><li class="navelem"><a class="el" href="dir_5bb0003d7907b45051943541418399f5.html">ntuser</a></li><li class="navelem"><a class="el" href="dir_2a0a56546b70a0973705719e6a88eab3.html">kernel</a></li><li class="navelem"><a class="el" href="a03605.html">msgbeep.c</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
